<div id="settings_plugin_curalegacy_import" class="modal hide fade">
    <div class="modal-header">
        <a href="#" class="close" data-dismiss="modal" aria-hidden="true">&times;</a>
        <h3>{{ _('Import Existing CuraEngine Legacy Profile') }}</h3>
    </div>
    <div class="modal-body">
        <form class="form-horizontal">
            <div class="control-group">
                <label class="control-label">{{ _('Profile ini file') }}</label>
                <div class="controls">
                    <div class="input-prepend">
                <span class="btn fileinput-button">
                    <span>{{ _('Browse...') }}</span>
                    <input id="settings-curalegacy-import" type="file" name="file" data-url="{{ url_for("plugin.curalegacy.import_cura_profile") }}" accept=".ini">
                </span>
                        <span class="add-on" data-bind="text: fileName"></span>
                    </div>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">{{ _('Identifier') }}</label>
                <div class="controls">
                    <input type="text" class="input-block-level" data-bind="value: profileName, attr: {placeholder: placeholderName}, enable: fieldsEnabled, css: {disabled: !fieldsEnabled()}">
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">{{ _('Name') }}</label>
                <div class="controls">
                    <input type="text" class="input-block-level" data-bind="value: profileDisplayName, valueUpdate: 'afterkeydown', attr: {placeholder: placeholderDisplayName}, enable: fieldsEnabled, css: {disabled: !fieldsEnabled()}">
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">{{ _('Description') }}</label>
                <div class="controls">
                    <input type="text" class="input-block-level" data-bind="value: profileDescription, attr: {placeholder: placeholderDescription}, enable: fieldsEnabled, css: {disabled: !fieldsEnabled()}">
                </div>
            </div>
            <div class="control-group">
                <div class="controls">
                    <label class="checkbox">
                        <input type="checkbox" data-bind="checked: profileMakeDefault, enable: fieldsEnabled() && !profileFirst(), css: {disabled: !fieldsEnabled() || profileFirst()}"> {{ _('Make default profile') }}
                    </label>
                </div>
            </div>
            <div class="control-group">
                <div class="controls">
                    <label class="checkbox">
                        <input type="checkbox" data-bind="checked: profileAllowOverwrite, enable: fieldsEnabled() && !profileFirst(), css: {disabled: !fieldsEnabled() || profileFirst()}"> {{ _('Overwrite existing file') }}
                    </label>
                </div>
            </div>
        </form>
        <small>{% trans %}
            You can import your existing profile <code>.ini</code> files from <strong>Cura 15.04.x or older</strong>
            here. Anything but those are <strong>not supported</strong>. That especially means that <code>.json</code>
            profiles from Cura 15.06.x and <code>.curaprofile</code> profiles from Cura 2.x, 3.x, 4.x, ... will not work, and neither
            will custom Cura profile formats that third party tools like e.g. Repetier create.
        {% endtrans %}</small>
    </div>
    <div class="modal-footer">
        <button class="btn" data-dismiss="modal" aria-hidden="true">{{ _('Abort') }}</button>
        <button class="btn btn-primary" data-bind="click: performUpload, enable: uploadEnabled, css: {disabled: !uploadEnabled()}" id="settings-curalegacy-import-start"><i class="fa fa-spinner fa-spin" data-bind="visible: uploadBusy"></i> {{ _('Confirm') }}</button>
    </div>
</div>
